package com.zx.dsptuneup_TriMic.Adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;
import androidx.annotation.NonNull;
import java.util.List;


/**
 * 此方法不再可用
 * */
public class MyArrayAdapter<T> extends ArrayAdapter {

    public MyArrayAdapter(@NonNull Context context, int resource, @NonNull List<T> objects) {
        super(context, resource, objects);
    }

    @Override
    public int getCount() {
        //返回数据的统计数量，大于0项则减去1项，从而不显示最后一项
        int count = super.getCount();
        return count>0?count-1:count;
    }
}
